<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018-01-03
 * Time: 15:37
 */

class Admin extends ZL_Controller{
    public function __construct(){
        parent::__construct();
    }

    private function load_defaults($title){
        $data['title'] = $this->site_title.$title;
        $data['uid'] = $this->session->uid;
        $data['level'] = $this->session->admin_level;
        $data['admin_name'] = $this->session->name;
        return $data;
    }

    public function index(){
        $data['title'] = $this->site_title.'后台首页';
        $this->load->view('admin_display/public/header.html');
        $this->load->view('admin_display/index.html');
        $this->load->view('admin_display/public/footer.html');
    }

    public function login(){
        $data = $this->load_defaults('登录');
        $this->load->view('admin_display/public/header.html',$data);
        $this->load->view('admin_display/login/login.html');
        $this->load->view('admin_display/public/footer.html');
    }
}